
using System;
using NUnit.Framework;

namespace Ley.Common.Tests.Framework
{
	public static class TestExtensions
	{
		public static void ShouldBeEqualTo(this object actual, object expected)
		{
			Assert.AreEqual(expected, actual);	
		}
		
		public static void ShouldBeEqualTo(this int actual, int expected)
		{
			Assert.AreEqual(expected, actual);	
		}
		
		public static void ShouldNotEqualTo(this int actual, int expected)
		{
			Assert.AreNotEqual(expected, actual);
		}
		
		public static void ShouldBeGreaterThan(this int actual, int expected)
		{
			Assert.Greater(actual, expected);
		}
		
		public static void ShouldBeTheSameWith(this object actual, object expected)
		{
			Assert.AreSame(expected, actual);
		}
		
		public static void ShouldBeTrue(this bool actual)
		{
			Assert.IsTrue(actual);	
		}
		
		public static void ShouldBeFalse(this bool actual)
		{
			Assert.IsFalse(actual);	
		}
		
		public static void IsCreated(this object subject)
		{
			Assert.IsNotNull(subject);	
		}
		
		public static void InstanceOf<TExpectedType>(this object subject)
		{
			Assert.That(subject is TExpectedType, string.Format("Actual type is {0}.", 
			                                                    subject.GetType().FullName));	
		}
		
		
	}
}
